package org.example.traing.persistence;


import lombok.Data;
import org.apache.ibatis.annotations.*;
import org.example.traing.entity.Service;

import java.util.List;

@Mapper
public interface ServiceMapper {

@Update("UPDATE service SET  status = #{status} WHERE service_id = #{serviceId}")
    public void updateService(String serviceId,String status);

@Insert("insert into service (uid, type,status) values (#{uid}, #{type},'等待处理')" )
    public void insertService(String uid,String type);

@Delete("delete from service where service_id = #{serviceId}")
    public   void deleteService(int serviceId);

@Select("SELECT * from service   where uid = #{uid}")
public List<Service> getService(String uid);

@Select("select * from service where service_id=#{serviceId}")
    public  Service getServiceByServiceId(int serviceId);
}
